<?php

namespace App\Helpers\Api;


use Dingo\Api\Http\Request;

trait DestroyTrait
{

    public function destroy(Request $request) {
        $this->validate($request, [
            'ids' => 'required'
        ]);
        $ids = $request->input('ids');
        $arr_id = explode(",", $ids);
        $this->model::whereIn('id', $arr_id)->delete();
        return $this->success([]);
    }

}
